<?php

// *** Documentation
/*______________________________________________________________________________

	Drupal Theme: WTFM Home Page

	Last Update: Aug 2007
	Author: Tom at klenwell@gmail.com

	SUMMARY
		Simple centered page displaying menu and RSS feed
		
	NOTES
		
______________________________________________________________________________*/


// initialize output components

  // MASTHEAD
  $_HTML['front_upper_menu'] = '';
  
  // CORE
  $_HTML['help'] = '';
  $_HTML['messages'] = '';
  $_HTML['search_box'] = '';
  $_HTML['front_sidebar'] = '';
  
  // FOOTER

  
// region: front_title

  // upper menu
  if ( !empty($front_upper_menu) )
  {
    $_HTML['front_upper_menu'] = "<div id=\"upper_menu\">{$front_upper_menu}</div>";
  }

  // vars
  $a_home = check_url($base_path);
  $h1_site_name = ( $site_name ) ? "<h1><a href=\"$a_home\">" . check_plain($site_name) . '</a></h1>' : '<h1>set site name</h1><small>or create custom front_title block</small>';
  $h3_site_slogan = ( $site_slogan ) ? '<h3>' . check_plain($site_slogan) . '</h3>' : '';
 
  // output
  if ( !empty($front_title) ) {
    $_HTML['front_title'] = $front_title;
  }
  else {
    $_HTML['front_title'] = <<<HTML
$h1_site_name
$h3_site_slogan
HTML;
  }

// logo
  if ( !empty($logo) ) {
    $_HTML['logo'] = '<div id="logo"><img src="'. check_url($logo) .'" alt="'. check_plain($site_name) .' logo" id="logo_img" /></div>';
  }
  
// primary links
  if ( isset($primary_links) ) {
    $_HTML['primary_links'] = theme('links', $primary_links, array('class' => 'links primary-links'));
  }
  
// front side bar
  if ( $sidebar ) $_HTML['sidebar'] = $sidebar;
  
// other page content

  if ( $help ) $_HTML['help'] = $help;
  if ( $messages ) $_HTML['messages'] = $messages;
  #if ( $breadcrumb ) $_HTML['breadcrumb'] = $breadcrumb;
  #if ( $mission ) $_HTML['mission'] = '<div id="mission">'. $mission .'</div>';
  #if ( $title ) $_HTML['title'] = '<h2'. ($tabs ? ' class="with-tabs"' : '') .'>'. $title .'</h2>';
  #if ( $tabs ) $_HTML['tabs'] = '<div id="tabs-wrapper" class="clear-block">' . $tabs . '</div>';
  #if ( isset($tabs2) ) $_HTML['tabs2'] = $tabs2;
  
  global $user;
  $_HTML['login_status'] = ( $user->uid ) ? l("log out","logout") : l("login","user");


// End PHP / Begin HTML output
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
<head>

<title><?php print $head_title ?></title>
<?php print $head ?>
<?php print $styles ?>
<?php print $scripts ?>

<!-- external stylesheets: template, print, ie -->
<style type="text/css" media="all">@import "<?php print base_path() . path_to_theme() ?>/front.css";</style>
<style type="text/css" media="print">@import "<?php print base_path() . path_to_theme() ?>/print.css";</style>
<!--[if lt IE 7]>
<style type="text/css" media="all">@import "<?php print base_path() . path_to_theme() ?>/fix-ie.css";</style>
<![endif]--> 

<!-- internal style sheet -->
<style type="text/css">
</style>
<!-- end internal style sheet -->

<!-- noscript stylesheet -->
<noscript><style type="text/css">
body { margin:1em auto; }
</style></noscript>



<!-- external javascript -->
<script type="text/javascript" src="<?php print base_path() . path_to_theme(); ?>/javascript/kw.tableless.js"></script>

<!-- internal javascript -->
<script type="text/javascript" language="javascript">
js_onload = function() 
{
  balance_doms(['core_left', 'core_right']);
  vcenter_dom_in_window('tpl-page-front');
}

window.onload=js_onload;
</script>


</head>
<!-- *** END DOCUMENT HEAD *** -->

<!-- *** START BODY *** -->
<body>

<?php print $_HTML['front_upper_menu']; ?>

<!-- PAGE -->
<div id="tpl-page-front" class="page">


<!-- centerpiece -->
<div id="core_panel">
<div class="child">

<!-- By default, this block is set up to be edited directly here in template -->
<!-- But it could also be set up to display a region (see core_right below) -->
<div id="core_left" class="column">
<div class="child">
<h1>wtfm<span class="lite">anual</span></h1>
<ul>
<li><b>framework:</b> <a href="http://www.drupal.org/">drupal</a></li>
<li><b>theme:</b> <a href="http://klenwell.googlecode.com/svn/trunk/PHP/drupal/themes/wtfm/">wtfm</a></li>
<li><b>author:</b> <a href="http://drupal.org/user/165240">tom at klenwell@gmail.com</a></li>
<li><a href="tracker">recent wtfm posts</a></li>
<li><?php print $_HTML['login_status']; ?></li>
</ul>
</div>
</div>

<!-- This is set up for a custom region call 'front_feed_list' which I use for an aggregator list -->
<div id="core_right" class="column">
<div class="child">
<?php  print $front_feed_list;?>
</div>
</div>

<div class="clear"></div>

</div>
</div>


<div id="footer_panel">
<div id="footer"><?php print $front_footer ?></div>
</div>


</div>	
<!-- end PAGE -->


<!-- Pre-Closure Includes -->


<!-- Close HTML -->
</body>
</html>
